package com.cn.data.jpa.web;

import com.cn.data.jpa.domain.Register;
import com.cn.data.jpa.service.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: chenl
 * @Date: 2019/1/5 0:03
 */
@RestController
@RequestMapping("/v1/propagation")
public class PropagationController {

    @Autowired
    private RegisterService service;

    @RequestMapping(value = "/required", method = RequestMethod.GET)
    public String registerTest() throws InterruptedException {
        Register register = new Register();
        register.setUsername("superman12345");
        register.setPassword("99999");
        service.register(register);
        return "success";
    }

}
